package object;

/**
 * @TODO   7. 输入任意一个年份，得到这年的2月份有几天
 * @Author xu
 * 2025/3/10
 */
import java.time.YearMonth;
import java.util.Scanner;

public class LocalDate07 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入年份: ");
        int year = scanner.nextInt();

        YearMonth february = YearMonth.of(year, 2);
        int daysInFebruary = february.lengthOfMonth();

        System.out.println(year + " 年 2 月有 " + daysInFebruary + " 天");
    }

}
